﻿using System;
using System.Collections.Generic;
using System.ServiceModel;
using System.Runtime.Serialization;

namespace TCKQKL.Service.DataContract
{
    /// <summary>
    /// Information about placed orders
    /// </summary>
    [DataContract()]
    public sealed class OrdersBoscModel
    {
        private string _orderID;
        //Buy/Sell
        private string _orderSide;
        //ATO/Limit
        private string _orderType;
        //Placed/Update/Cancel
        private string _orderClass;
        //Pending/Confirmed
        private string _orderStatus;        
        private DateTime _openDate;
        private decimal _quantity;
        private decimal _price;
        private string _symbol;
        private decimal _orderFee;
        private string _orderOrigin;

        public OrdersBoscModel()
        {
        }
        public OrdersBoscModel(string orderID, string orderSide, string orderType, string orderClass, string orderStatus, DateTime openDate, decimal quantity, decimal price, string symbol, decimal orderFee, string orderOrigin)
        {
            this._orderID = orderID;
            this._orderSide = orderSide;
            this._orderType = orderType;
            this._orderClass = orderClass;
            this._orderStatus = orderStatus;
            this._openDate = openDate;
            this._quantity = quantity;
            this._price = price;
            this._symbol = symbol;
            this._orderFee = orderFee;
            this._orderOrigin = orderOrigin;
        }

        [System.Xml.Serialization.XmlElementAttribute(ElementName = "orderID", Order = 1, IsNullable = false)]
        [DataMember(IsRequired = false, Name = "orderID", Order = 1)]
        public string orderID
        {
            get
            {
                return _orderID;
            }

            set
            {
                this._orderID = value;
            }
        }

        [System.Xml.Serialization.XmlElementAttribute(ElementName = "orderSide", Order = 2, IsNullable = false)]
        [DataMember(IsRequired = false, Name = "orderSide", Order = 2)]
        public string orderSide
        {
            get
            {
                return _orderSide;
            }
            set { this._orderSide = value; }
        }

        [System.Xml.Serialization.XmlElementAttribute(ElementName = "orderType", Order = 3, IsNullable = false)]
        [DataMember(IsRequired = false, Name = "orderType", Order = 3)]
        public string orderType
        {
            get
            {
                return _orderType;
            }
            set { this._orderType = value; }
        }

        [System.Xml.Serialization.XmlElementAttribute(ElementName = "orderClass", Order = 4, IsNullable = false)]
        [DataMember(IsRequired = false, Name = "orderClass", Order = 4)]
        public string orderClass
        {
            get
            {
                return _orderClass;
            }
            set { this._orderClass = value; }
        }

        [System.Xml.Serialization.XmlElementAttribute(ElementName = "orderStatus", Order = 5, IsNullable = false)]
        [DataMember(IsRequired = false, Name = "orderStatus", Order = 5)]
        public string orderStatus
        {
            get
            {
                return _orderStatus;
            }

            set
            {
                this._orderStatus = value;
            }
        }

        [System.Xml.Serialization.XmlElementAttribute(ElementName = "openDate", Order = 6, IsNullable = false)]
        [DataMember(IsRequired = false, Name = "openDate", Order = 6)]
        public DateTime openDate
        {
            get
            {
                return _openDate;
            }

            set
            {
                this._openDate = value;
            }

        }

        [System.Xml.Serialization.XmlElementAttribute(ElementName = "quantity", Order = 7, IsNullable = false)]
        [DataMember(IsRequired = false, Name = "quantity", Order = 7)]
        public decimal quantity
        {
            get
            {
                return _quantity;
            }

            set
            {
                this._quantity = value;
            }
        }

        [System.Xml.Serialization.XmlElementAttribute(ElementName = "price", Order = 8, IsNullable = false)]
        [DataMember(IsRequired = false, Name = "price", Order = 8)]
        public decimal price
        {
            get
            {
                return _price;
            }

            set
            {
                this._price = value;
            }
        }

        [System.Xml.Serialization.XmlElementAttribute(ElementName = "symbol", Order = 9, IsNullable = false)]
        [DataMember(IsRequired = false, Name = "symbol", Order = 9)]
        public string symbol
        {
            get
            {
                return _symbol;
            }

            set
            {
                this._symbol = value;
            }
        }

        [System.Xml.Serialization.XmlElementAttribute(ElementName = "orderFee", Order = 10, IsNullable = false)]
        [DataMember(IsRequired = false, Name = "orderFee", Order = 10)]
        public decimal orderFee
        {
            get
            {
                return _orderFee;
            }

            set
            {
                this._orderFee = value;
            }
        }

        [System.Xml.Serialization.XmlElementAttribute(ElementName = "orderOrigin", Order = 11, IsNullable = false)]
        [DataMember(IsRequired = false, Name = "orderOrigin", Order = 11)]
        public string orderOrigin
        {
            get
            {
                return _orderOrigin;
            }
            set { this._orderOrigin = value; }
        }

    }
}
